#ifndef COMPONENT_H
#define COMPONENT_H

#include <QList>
#include "namespace.h"

class MemberList;
class MemberFunction;
class Property;
class MemberEvent;
class MemberTemplate;
class Template;

class Component : public Namespace
{
public:
    Component(const QString& name, MemberList* members, const YYLTYPE& loc );

    QString name() const { return m_name; }
    MemberList* memberList() const { return m_members; }

    virtual void resolveAll();
    virtual Node* getEntry( const QString& name );

    QList<MemberFunction*> memberFunctions() const;
    MemberFunction* constructor() const;
    MemberFunction* destructor() const;
    QList<MemberEvent*> events() const;
    MemberEvent* event(const QString& name) const;
    QList<MemberTemplate*> memberTemplates() const;
    MemberTemplate* memberTemplate(const QString& name) const;
    QList<Property*> properties() const;
    Property* property(const QString& name) const;
    QList<Template*> templates() const;

private:
    QString m_name;
    MemberList* m_members;
};

#endif // COMPONENT_H
